#ifndef FORMQUESTION_H
#define FORMQUESTION_H

#include <QtGui/QWidget>
#include <QGroupBox>
#include <QTextStream>

#include "ui_FormQuestion.h"

extern const char* comp[];
extern const char* opcao[];
extern const char* tipos[];

enum COMP
{
	CMP_NONE = 0,
	CMP_GREATER_OR_EQUAL = 1,
	CMP_MINOR_OR_EQUAL = 2,
	CMP_GREATER = 3,
	CMP_MINOR = 4,
};

enum OPCOES
{
	OP_NONE = 0,
	OP_AND = 1,
	OP_OR = 2,
};

enum TIPOS
{
	TP_INTEIRO = 0,
	TP_REAL = 1,
	TP_TEXTO = 2,
	TP_BOOL = 3,
};

class FormQuestion : public QGroupBox
{
    Q_OBJECT

public:
    FormQuestion(QWidget *parent = 0);
    ~FormQuestion();

    bool isChecked(void){return (ui.remove->checkState() != 0);};
    TIPOS getType(void);
    QString getQuestion(void);

    friend QTextStream& operator<<(QTextStream& s, const FormQuestion& fq);
    friend QTextStream& operator>>(QTextStream& s, const FormQuestion& fq);

private:
    Ui::FormQuestionClass ui;
};

#endif // FORMQUESTION_H
